home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / 3dvect37.zip / MOVEIT.EXT < prev    next >
Text File  |  1994-06-22  |  12KB  |  381 lines

  1. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  2. ;
  3. ; Filename     : moveit.ext
  4. ; Included from: Your Program
  5. ; Description  : External Definitions and Macros for Animations
  6. ;
  7. ; Written by: John McCarthy
  8. ;             1316 Redwood Lane
  9. ;             Pickering, Ontario.
  10. ;             Canada, Earth, Milky Way (for those out-of-towners)
  11. ;             L1X 1C5
  12. ;
  13. ; Internet/Usenet:  BRIAN.MCCARTHY@CANREM.COM
  14. ;         Fidonet:  Brian McCarthy 1:229/15
  15. ;   RIME/Relaynet: ->CRS
  16. ;
  17. ; Home phone, (905) 831-1944, don't call at 2 am eh!
  18. ;
  19. ; John Mccarthy would really love to work for a company programming Robots
  20. ; or doing some high intensive CPU work.  Hint. Hint.
  21. ;
  22. ; Send me your protected mode source code!
  23. ; Send me your Objects!
  24. ; But most of all, Send me a postcard!!!!
  25. ;
  26. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  27.  
  28.                extrn animate_this:near
  29.                extrn _standard_screen_draw:near
  30.  
  31. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  32. ; header commands
  33. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  34.  
  35. hdone          equ 0     ; done this header: (null)
  36. hdone_all      equ 1     ; done all headers - exit routine: (null)
  37. hloopto        equ 2     ; loop header:offset destination
  38. hseq           equ 3     ; do sequence: number (from sequence offset table)
  39.  
  40. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  41. ; sequencing animation commands (use them without the q part)
  42. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  43.  
  44. qoff           equ 0     ; turn object on/off:(type)
  45. qon            equ 1
  46.    object      equ 1     ; turn object on/off
  47.    subobject   equ 2     ; turn sub_object on/off
  48. qnew_object    equ 2     ; find next available object:(null)
  49. qcamera        equ 3     ; sequence affects camera, not object:(null)
  50.  
  51. qreset_irq     equ 5     ; reset irq frame_number  (null)
  52.  
  53. qset_mode      equ 6     ; set xmode: mode,xactual,yactual,# of pages
  54. qset_clip_a    equ 7     ; set clipping - absolute method: x1,y1,x2,y2
  55. qset_clip_o    equ 8     ; clip - offset method: x1,y1,x2,y2,xcenter,ycenter
  56.  
  57. qshape         equ 10    ; set shape of object: number
  58. qmove          equ 11    ; move object from whereever to: x,y,z,time to take
  59. qpoint_tm      equ 12    ; point object in direction it is moving: time
  60.  
  61. qlocation      equ 14    ; put object at location:xs,ys,zs
  62. qlocationx     equ 15    ; adjust location of axis: xs
  63. qlocationy     equ 16    ; adjust location of axis: ys
  64. qlocationz     equ 17    ; adjust location of axis: zs
  65.  
  66. qangle         equ 18    ; set object angle:vxs,vys,vzs
  67. qanglex        equ 19    ; adjust angle on single axis: vxs
  68. qangley        equ 20    ; adjust angle on single axis: vys
  69. qanglez        equ 21    ; adjust angle on single axis: vzs
  70.  
  71. qwait_for      equ 22    ; end sequencing commands until argument resolved
  72.                          ; eg:wait command - where command is of the following
  73.   lc           equ 3     ; wait for lcount = # (reach destination): number
  74.   ac           equ 4     ; wait for acount = # (stop rotating): number
  75.   frame_a      equ 5     ; wait for a specified frame number (absolute): number
  76.   frame_r      equ 6     ; wait for a relative frame number: number
  77.  
  78. qexit          equ 23    ; end this sequence - return to header commands: (null)
  79. qset_bitmap    equ 24    ; set object to bitmap: bitmap#,xscale,yscale
  80. qbullet        equ 25    ; set object to bullet: (null)
  81.  
  82. qalign_a       equ 26    ; continously align objects angle to its direction: time
  83. qalign_d       equ 27    ; continously align objects direction to its angle: speed of object
  84. qalign_off     equ 28    ; automatic align mode off: (null)
  85.  
  86. qfade_all      equ 30    ; fade palette to a common colour: red,grn,blu,add,inc,waitstate
  87. qfade_to       equ 31    ; fade palette to another palette: offset,add,inc,waitstate - note offset is relative!
  88. qdraw_icon     equ 32    ; decode bitmap from bitmap list: number,x1,y1,xscale,yscale
  89. qinitialize    equ 33    ; wipe video memory, palette and reset all 3d stuff
  90. qfollow_me     equ 34    ; get camera to follow this object: time
  91. qfollow_obj    equ 35    ; get camera to follow header number: header#,time
  92. qpoint_obj     equ 36    ; point object at location: x,y,z,time
  93. qtext          equ 37    ; display text string using font routine: offset string
  94. qinit_bitmap   equ 38    ; set bitbase offset: #,offset to bitmap,xscale,yscale
  95. qinit_shape    equ 39    ; set objbase offset: #,offset to shape data
  96. qno_rotation   equ 40    ; object has no rotation (userotate=1) :(null)
  97. qfull_rotation equ 41    ; object has full rotation capabilities:(null)
  98. qxref_palette  equ 42    ; set cross referancing palette for object
  99. qtwist_it      equ 43    ; rotate object until location x,y,z in di frames
  100. qtwist_x       equ 44    ; twist object along single axis: x angle,time
  101. qtwist_y       equ 45    ; twist object along single axis: y angle,time
  102. qtwist_z       equ 46    ; twist object along single axis: z angle,time
  103. qrotate_it     equ 47    ; rotate object:vxadds,vyadds,vzadds,acount
  104. qrotate_x      equ 48    ; rotate object along single axis: x speed, count
  105. qrotate_y      equ 49    ; rotate object along single axis: y speed, count
  106. qrotate_z      equ 50    ; rotate object along single axis: z speed, count
  107. qcall_me       equ 51    ; call user defined subroutine: offset routine
  108. qnew_mainline  equ 52    ; define new mainline draw routine:offset routine
  109.  
  110. qoption1       equ 60    ; put your options here
  111. qoption2       equ 61
  112. qoption3       equ 62
  113.  
  114. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  115. ; these are the macros which set up the above commands
  116. ; for an example of how these work, see the sequence.inc file
  117. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  118.  
  119. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  120. ; header command macros
  121. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  122.  
  123. done           macro
  124.                dw hdone
  125.                endm
  126.  
  127. done_all       macro
  128.                dw hdone_all
  129.                endm
  130.  
  131. loopto         macro offxet
  132.                dw hloopto, offxet-s
  133.                endm
  134.  
  135. seq            macro rat
  136.                dw hseq, rat
  137.                endm
  138.  
  139. ; sequence command macros
  140.  
  141. off            macro type
  142.                dw qoff,type
  143.                endm
  144.  
  145. on             macro type
  146.                dw qon,type
  147.                endm
  148.  
  149. new_object     macro
  150.                dw qnew_object
  151.                endm
  152.  
  153. camera         macro
  154.                dw qcamera
  155.                endm
  156.  
  157. reset_irq      macro
  158.                dw qreset_irq
  159.                endm
  160.  
  161. set_mode       macro mode,xa,ya,pagez
  162.                dw qset_mode
  163.                dw mode,xa,ya,pagez
  164.                endm
  165.  
  166. set_clip_a     macro aq,bq,cq,dq
  167.                dw qset_clip_a
  168.                dw aq,bq,cq,dq
  169.                endm
  170.  
  171. set_clip_o     macro aq,bq,cq,dq,su,du
  172.                dw qset_clip_o
  173.                dw aq,bq,cq,dq,su,du
  174.                endm
  175.  
  176. shape          macro shpa
  177.                dw qshape,shpa
  178.                endm
  179.  
  180. move           macro ra,rb,rc,tm
  181.                dw qmove
  182.                dd ra,rb,rc
  183.                dw tm
  184.                endm
  185.  
  186. point_tm       macro timegg
  187.                dw qpoint_tm,timegg
  188.                endm
  189.  
  190. location       macro xc,yc,zc
  191.                dw qlocation
  192.                dd xc,yc,zc
  193.                endm
  194.  
  195. locationx      macro rq
  196.                dw qlocationx
  197.                dd rq
  198.                endm
  199.  
  200. locationy      macro rq
  201.                dw qlocationy
  202.                dd rq
  203.                endm
  204.  
  205. locationz      macro rq
  206.                dw qlocationz
  207.                dd rq
  208.                endm
  209.  
  210. angle          macro vqs,vzs,vts
  211.                dw qangle,vqs,vzs,vts
  212.                endm
  213.  
  214. anglex         macro tqt
  215.                dw qanglex,tqt
  216.                endm
  217.  
  218. angley         macro tqt
  219.                dw qangley,tqt
  220.                endm
  221.  
  222. anglez         macro tqt
  223.                dw qanglez,tqt
  224.                endm
  225.  
  226. wait_for       macro waittype,sample1
  227.                dw qwait_for,waittype
  228.                dd sample1
  229.                endm
  230.  
  231. exit           macro
  232.                dw qexit
  233.                endm
  234.  
  235. set_bitmap     macro bitmp,xsc,ysc
  236.                dw qbitmap
  237.                dd bitmp
  238.                dw xsc,ysc
  239.                endm
  240.  
  241. bullet         macro
  242.                dw qbullet
  243.                endm
  244.  
  245. align_a        macro ttxxd
  246.                dw qalign_a,ttxxd
  247.                endm
  248.  
  249. align_d        macro spd
  250.                dw qalign_d,spd
  251.                endm
  252.  
  253. align_off      macro    ; automatic align mode off: (null)
  254.                dw qalign_off
  255.                endm
  256.  
  257. fade_all       macro rdx,grn,blx,xad,xinc,waitstate
  258.                dw qfade_all,rdx,grn,blx,xad,xinc,waitstate
  259.                endm
  260.  
  261. fade_to        macro palxt,xad,xinc,waitstate
  262.                dw qfade_to
  263.                dd offset palxt
  264.                dw xad,xinc,waitstate
  265.                endm
  266.  
  267. draw_icon      macro number,x1,y1,xsc,ysc
  268.                dw qdraw_icon,number,x1,y1,xsc,ysc
  269.                endm
  270.  
  271. initialize     macro
  272.                dw qinitialize
  273.                endm
  274.  
  275. follow_me      macro tim
  276.                dw qfollow_me,tim
  277.                endm
  278.  
  279. follow_obj     macro num,tim
  280.                dw qfollow_obj,num,tim
  281.                endm
  282.  
  283. point_obj      macro ivx,ivy,ivz,tim
  284.                dw qpoint_obj
  285.                dd ivx,ivy,ivz
  286.                dw tim
  287.                endm
  288.  
  289. text           macro txts
  290.                dw qtext
  291.                dd offset txts
  292.                endm
  293.  
  294. init_bitmap    macro nm,blot,xscalq,yscalq
  295.                dw qinit_bitmap,nm
  296.                dd offset blot
  297.                dw xscalq,yscalq
  298.                endm
  299.  
  300. init_shape     macro nb,shapeoffset
  301.                dw qinit_shape,nb
  302.                dd offset shapeoffset
  303.                endm
  304.  
  305. no_rotation    macro
  306.                dw qno_rotation
  307.                endm
  308.  
  309. full_rotation  macro
  310.                dw qfull_rotation
  311.                endm
  312.  
  313. xref_palette   macro ofsetq
  314.                dw qxref_palette
  315.                dd offset ofsetq
  316.                endm
  317.  
  318. twist_it       macro fx,fy,fz,time
  319.                dw qtwist_it
  320.                dd fx,fy,fz
  321.                dw time
  322.                endm
  323.  
  324. twist_x        macro fx,time
  325.                dw qtwist_x
  326.                dd fx
  327.                dw time
  328.                endm
  329.  
  330. twist_y        macro fy,time
  331.                dw qtwist_y
  332.                dd fy
  333.                dw time
  334.                endm
  335.  
  336. twist_z        macro fz,time
  337.                dw qtwist_z
  338.                dd fz
  339.                dw time
  340.                endm
  341.  
  342. rotate_it      macro rxa,rya,rza,acnt
  343.                dw qrotate_it
  344.                dw rxa,rya,rza,acnt
  345.                endm
  346.  
  347. rotate_x       macro speedx,countr
  348.                dw qrotate_x,speedx,countr
  349.                endm
  350.  
  351. rotate_y       macro speedy,countr
  352.                dw qrotate_y,speedy,countr
  353.                endm
  354.  
  355. rotate_z       macro speedz,countr
  356.                dw qrotate_z,speedz,countr
  357.                endm
  358.  
  359. call_me        macro ongf
  360.                dw qcall_me
  361.                dd ongf
  362.                endm
  363.  
  364. new_mainline   macro ongfw
  365.                dw qnew_mainline
  366.                dd ongfw
  367.                endm
  368.  
  369. option1        macro ; make your own options
  370.                dw qoption1
  371.                endm
  372.  
  373. option2        macro
  374.                dw qoption2
  375.                endm
  376.  
  377. option3        macro
  378.                dw qoption3
  379.                endm
  380.  
  381.